{% extends "base.html" %}
{% block head %}
{{ super() }}
{% endblock %}
{% block content %}
<div class="container">
  <h1>Set</h1>
  <button class="btn btn-primary" onclick="location.href='/sets/{{ set.id }}/add_element'">Add element</button>
  <button class="btn btn-danger" onclick="location.href='/sets/{{ set.id }}/delete_element'">Delete element</button>
  <br></br>

  <table class="table personal-table">
    <tbody>
      <tr>
        <th>Name</th>
        <td>{{ set.name }}</td>
      </tr>
      <tr>
        <th>Type</th>
        <td>{{ set.type }}</td>
      </tr>
      <tr>
        <th>Elements</th>
        <td>
          <ul>
            {% if set.elements != None %}
            {{ set.elements }}
            {% else %}
            <li>No elements</li>
            {% endif %}
          </ul>
        </td>
      </tr>
    </tbody>
  </table>
  <a href="/sets/{{ set.id }}/delete" class="btn btn-danger">Delete</a>
</div>
{% endblock %}